package com.genius.action;

import java.util.List;

import com.genius.core.manager.StudentManager;
import com.genius.model.Batch;
import com.genius.model.Student;
import com.genius.model.Teacher;
import com.opensymphony.xwork.ActionSupport;

public class CIAction extends ActionSupport
{
    
	private static final long serialVersionUID = 1L;

	private Teacher teacher = null;

    private StudentManager studentManager = null;
    
    private List ciList = null;
        
        
 

    public CIAction()
    {
        this.teacher = new Teacher();
    }

    /**
     * @see com.opensymphony.xwork.ActionSupport#execute()
     */
    public String showAddCIForm() throws Exception
    {
        //Returns page with student entry form
        return this.SUCCESS;
    }
    
    /**
     * @see com.opensymphony.xwork.ActionSupport#execute()
     */
    public String addCI() throws Exception
    {
        this.studentManager.addTeacher(teacher);
        ciList = this.studentManager.getTeacherList();
        //Returns page with student entry form
        return this.SUCCESS;
    }
 

    
    /**
     * @return Returns the studentManager.
     */
    public StudentManager getStudentManager()
    {
        return studentManager;
    }

    /**
     * @param studentManager The studentManager to set.
     */
    public void setStudentManager(StudentManager studentManager)
    {
        this.studentManager = studentManager;
    }


    /**
     * @return Returns the ciList.
     */
    public List getCiList()
    {
        return ciList;
    }

    /**
     * @param ciList The ciList to set.
     */
    public void setCiList(List ciList)
    {
        this.ciList = ciList;
    }

    /**
     * @return Returns the teacher.
     */
    public Teacher getTeacher()
    {
        return teacher;
    }

    /**
     * @param teacher The teacher to set.
     */
    public void setTeacher(Teacher teacher)
    {
        this.teacher = teacher;
    }


}
